# -*- coding: utf-8 -*-
"""
Created on Mon Aug 12 12:21:00 2025
Running the LDA for environmental complaints text mining

@author: marina

NOTE: This script contains scripts for the full sample, for which wordclouds are not created.
We include these scripts to output numbers for Table E1 in the paper.

"""

import pandas as pd
import os
import sys
# Ensure the script can find the paths module
# This assumes that the paths.py file is in the same directory as this script
current_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(current_dir)

from paths import target_path # Construct the full path to the target directory with the replicator's own path
# C:/Users/mrz2ym/The Lab Dropbox/Marina Starikovsky/Text_Mining_Copy/Environmental_Complaints

sys.path.append(os.path.join(target_path, "Full_Sample", "Python_Code"))
sys.path.append(os.path.join(target_path, "Air_Subset", "Python_Code"))
sys.path.append(os.path.join(target_path, "Waste_Subset", "Python_Code"))
sys.path.append(os.path.join(target_path, "Water_Subset", "Python_Code"))

# Import the necessary modules from the Python_Code directory
import Air_LDA_Preprocess_Lemmatize
import Air_LDA_Seeds
import Air_LDA_Lemmas_10_Topics
import Air_LDA_Lemmas_10_Topics_seed_2
import Air_LDA_Lemmas_10_Topics_seed_3
import Waste_LDA_Preprocess_Lemmatize
import Waste_LDA_Seeds
import Waste_LDA_Lemmas_10_Topics_seed_3
import Water_LDA_Preprocess_Lemmatize
import Water_LDA_Seeds
import Water_LDA_Lemmas_10_Topics
import LDA_Preprocess_Lemmatize
import LDA_Lemmas_10_Topics

# Use the main function from both modules to run the scripts
def main():
    Air_LDA_Preprocess_Lemmatize.main()
    Air_LDA_Seeds.main()
    Air_LDA_Lemmas_10_Topics.main()
    Air_LDA_Lemmas_10_Topics_seed_2.main()
    Air_LDA_Lemmas_10_Topics_seed_3.main()
    Waste_LDA_Preprocess_Lemmatize.main()
    Waste_LDA_Seeds.main()
    Waste_LDA_Lemmas_10_Topics_seed_3.main()
    Water_LDA_Preprocess_Lemmatize.main()
    Water_LDA_Seeds.main()
    Water_LDA_Lemmas_10_Topics.main()
    LDA_Preprocess_Lemmatize.main()
    LDA_Lemmas_10_Topics.main()

if __name__ == "__main__":
    main()